package com.yanfan.energy.service;

import com.alibaba.excel.read.listener.ReadListener;
import com.yanfan.energy.domain.*;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

public interface ExcelService {

    /**
     * excel导出
     */
    void download(Class head, List<EquipmentConsumptionDto> data, HttpServletResponse response) throws IOException;

    /**
     * excel导出
     *
     * @param head
     * @param data
     * @param response
     * @author caijinkang
     * @date 2023/1/9 17:16
     */
    void downloadByMaterials(Class head, List<Materials> data, HttpServletResponse response) throws IOException;

    /**
     * excel导出
     *
     * @param head
     * @param data
     * @param response
     * @author caijinkang
     * @date 2023/1/9 17:54
     */
    void downloadByStationRecords(Class head, List<StationRecords> data, HttpServletResponse response) throws IOException;

    /**
     * excel导出
     *
     * @param head
     * @param data
     * @param response
     * @author caijinkang
     * @date 2023/1/10 15:45
     */
    void downloadByMaterialRecords(Class head, List<MaterialRecords> data, HttpServletResponse response) throws IOException;

    /**
     * excel导出
     *
     * @param head
     * @param data
     * @param response
     * @author caijinkang
     * @date 2023/1/11 10:55
     */
    void downloadBySchedules(Class head, List<Schedules> data, HttpServletResponse response) throws IOException;

    /**
     * excel导出
     *
     * @param head
     * @param data
     * @param response
     * @author caijinkang
     * @date 2023/1/11 15:20
     */
    void downloadByApprovals(Class head, List<Approvals> data, HttpServletResponse response) throws IOException;

    /**
     * excle导出
     *
     * @param head
     * @param data
     * @param response
     * @author caijinkang
     * @date 2023/1/12 17:26
     */
    void downloadByAssignments(Class head, List<Assignments> data, HttpServletResponse response) throws IOException;

    /**
     * excel解析
     *
     * @param head
     * @param readListener
     * @param file
     * @return
     * @throws IOException
     */
    Boolean importSystemConstruction(Class head, ReadListener readListener, MultipartFile file) throws IOException;

    /**
     * excel导出
     */
    void downloadList(Class head, List data, HttpServletResponse response) throws IOException;


    public void downloadList(Class head, List data, HttpServletResponse response, String nameStr) throws IOException;

}
